<!DOCTYPE html>
<html>

<head>

    {include file="Public/header"}
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <style>
        .radio-inline input[type=radio] {
            margin-top: 4px
        }

        .note-editable {
            height: 200px
        }

        .textEff {
            border: 0;
            background-color: #efffff;
            width: 200px
        }
    </style>
</head>

<body style="color:#333;padding:3px;" class="x_sorll">
<!-- 标题 -->
<div class="page-heade">
    <h2 class="title_color text-center">添加进场申请明细</h2>
</div>
<!-- 标题 -->
<div class="row-margin-top">
    <form action="" class="form-inline" id="form1">
        <table class="table-bordered table t_table">
            <tr>
                <td style="min-width: 180px;width: 180px" class="text-right">
                    <label for="">网点<span class="colorRed">*</span>：</label>
                </td>
                <td colspan="3">
                    <div class="col-xs-4">
                        <div class="input-group" id="" >
                            <input type="text" placeholder="请输入关键字或空格查询" class="form-control inputremindPeple" id="net" value="{:isset($supply)?$supply.jxs:''}">
                            <div class="input-group-btn">
                                <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
                                    <span class="caret"></span>
                                </button>
                                <ul class="dropdown-menu dropdown-menu-right" role="menu">
                                </ul>
                            </div>
                        </div>
                    </div>
                    <div class="col-xs-4">
                        <button class="btn btn-primary" id="select_net">选择</button>
                        <button class="btn btn-primary clear_net" id="clear_net">清空</button>
                        <button href="javascript:;" id="select_my_net">选择我的常用网点分组</button>
                    </div>
                </td>
            </tr>
            <tr>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">您选定的网点是：</label></td>
                <td class="text-left" colspan="3" id="netTwo">
                    <div class="duoxuan" id="selected_net">
                        {if isset($list)}
                        {volist name="list.net" id="row"}
                        <span class="ren" data-id="{$row.id}">{$row.title}<span class="close">×</span></span>
                        {/volist}
                        {/if}
                    </div>
                </td>
                <td class="text-left" id="saveFormalFz"><a href="javascript:;" id="saveAsCommonNetGroup">保存为常用网点分组</a></td>
            </tr>
            <tr>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">已进场条码</label></td>
                <td class="text-left" colspan="3" id="yiJinChangTiaoMa">
                </td>
            </tr>
            <tr>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for=""></label></td>
                <td class="text-left" colspan="3">温馨提示：已进场条码包括:1、任何时间段进场并且未退场的条码。2、单店销量指的是该网点上月的销量，如果新店进场则填写新店进场。</td>
            </tr>
            <tr>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">本次进场条码<span class="colorRed">*</span>：</label>
                </td>
                <td colspan="3">
                    <div style="display: inline-block;position:relative;">
                        <input type="text" placeholder="请输入关键字或空格查询" class="form-control inputremindPeple" id="benCiJinChangTiaoMa" value="">
                        <div class="cg_suggest" style="display: none;">

                        </div>
                    </div>
                    <button class="btn btn-primary" id="select_benCiJinChangTiaoMa">选择</button>
                    <button class="btn btn-primary clear_net" id="clear_benCiJinChangTiaoMa">清空</button>
                </td>
            </tr>
            <tr>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">您选定的本次进场产品是：</label></td>
                <td class="text-left" colspan="3">
                    <div class="duoxuan" id="selected_benCiJinChangTiaoMa">
                        {if isset($list)}
                        {volist name="list.net" id="row"}
                        <span class="ren" data-id="{$row.id}">{$row.title}<span class="close">×</span></span>
                        {/volist}
                        {/if}
                    </div>
                </td>
            </tr>
            <tr>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">进场月份<span
                        class="colorRed">*</span>：</label></td>
                <td class="text-left">
                    <select name="year" id="year" class="form-control">
                        <option value="">请选择</option>
                        {volist name="years" id="row"}
                        <option value="{$row}" {if date('Y')==$row}selected{/if}>{$row}</option>
                        {/volist}
                    </select>年
                    <select name="month" id="month" class="form-control">
                        <option value="">请选择</option>
                        <option value="1" {if trim(date('m'),'0')==1}selected{/if}>1</option>
                        <option value="2" {if date('m')==2}selected{/if}>2</option>
                        <option value="3" {if trim(date('m'),'0')==3}selected{/if}>3</option>
                        <option value="4" {if date('m')==4}selected{/if}>4</option>
                        <option value="5" {if date('m')==5}selected{/if}>5</option>
                        <option value="6" {if date('m')==6}selected{/if}>6</option>
                        <option value="7" {if date('m')==7}selected{/if}>7</option>
                        <option value="8" {if date('m')==8}selected{/if}>8</option>
                        <option value="9" {if date('m')==9}selected{/if}>9</option>
                        <option value="10" {if date('m')==10}selected{/if}>10</option>
                        <option value="11" {if date('m')==11}selected{/if}>11</option>
                        <option value="12" {if date('m')==12}selected{/if}>12</option>
                    </select>月
                </td>
                <td style="min-width: 200px;width: 200px" class="text-right">
                    <label for="">负责人<span class="colorRed">*</span>：</label>
                </td>
                <td>
                    <input type="text" class="form-control" style="min-width: 220px;" name="head" value="{:db('employee')->where('id',session('employee_id'))->value('em_name')}" id="head">
                    <input type="hidden" name="head_id" value="{:session('employee_id')}" >
                </td>
            </tr>
            <tr>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">预计核销时间<span class="colorRed">*</span>：</label>
                </td>
                <td><input type="text" class="form-control layer-date" name="expCanTime" id="expCanTime" value="{:date('Y-m-d',strtotime('+3 month',time()))}"></td>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">费用支付方式<span class="colorRed">*</span>：</label>
                </td>
                <td>
                    <select name="paymethod" id="paymethod" class="form-control">
                        <option value="">请选择</option>
                        {volist name="fipay" id="row"}
                        <option value="{$row.id}">{$row.title}</option>
                        {/volist}
                    </select>
                </td>
            </tr>
            <tr>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">三级费用科目<span class="colorRed">*</span>：</label>
                </td>
                <td>
                    <select name="feetype" id="feetype" class="form-control">
                        {volist name="feetype" id="row"}
                        <option value="{$row.id}">{$row.title}</option>
                        {/volist}
                    </select>
                </td>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">未税总额(元)<span
                        class="colorRed">*</span><span class="helpText">帮</span></label></td>
                <td><input type="text" class="form-control" name="amount" id="amount"></td>
            </tr>
            <tr>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">是否增值税(可抵扣)<span
                        class="colorRed">*</span>：</label></td>
                <td>
                    <div class="form-group">
                        <label class="radio-inline">
                            <input type="radio" name="isVAT" id="is_ok" value="1" checked>是
                        </label>
                        <label class="radio-inline">
                            <input type="radio" name="isVAT" id="is_no" value="0">否
                        </label>

                    </div>
                </td>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">税率<span
                        class="colorRed">*</span></label></td>
                <td><input type="text" class="form-control" name="shuilv" style="width: 50px;" id="shuilv">%</td>
            </tr>
            <tr>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">含税总额(元)<span
                        class="colorRed">*</span></label></td>
                <td><input type="text" class="form-control" name="hanshui" id="hanshui" readonly></td>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">实际投入总额(元)<span
                        class="colorRed">*</span></label></td>
                <td><input type="text" class="form-control" name="fb_shijitourufeiyong" id="fb_shijitourufeiyong" readonly></td>
            </tr>
            <tr>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">费用计入部门<span class="colorRed">*</span></label>
                </td>
                <td>
                    <div style="display: inline-block;position:relative;">
                        <input type="text" class="form-control" name="jrbm" id="jrbm">
                        <div id="jrbm_queding" class="selectedOnlyOne" style="display: none;">
                            <span class="inin">第一个经销商</span>
                            <span class="close">×</span>
                        </div>
                        <div class="cg_suggest" style="display: none;">

                        </div>
                    </div>
                    <a href="javascript:;" class="btn btn-primary" id="select_fyjrbm">选择</a>
                </td>
                <td style="min-width: 200px;width: 200px" class="text-right"><label for="">费用计入方案</label></td>
                <td>
                    <select name="project" id="" class="form-control">
                        <option value="">请选择</option>
                        {volist name="fijiru" id="row"}
                        <option value="{$row.id}">{$row.title}</option>
                        {/volist}
                    </select>
                </td>
            </tr>
        </table>

        <table class="table-bordered table t_table" style="margin:1px" id="table1">
            <tr class="info">
                <th class="text-center">产品名称</th>
                <th class="text-center">标准出产价</th>
                <th class="text-center">经销商原价<span class="colorRed">*</span></th>
                <th class="text-center">零售商供货价<span class="colorRed">*</span></th>
                <th class="text-center">公司建议售价<span class="colorRed">*</span></th>
            </tr>
            <tbody class="prd">
            </tbody>
            <tfoot>
            <tr>
                <td class="text-right" row="2" style="width: 280px;">备注</td>
                <td colspan="4">
                    <textarea name="brief" id="" rows="2" class="form-control" style="width: 50%"></textarea><span
                        style="vertical-align: bottom;">(200)</span>
                </td>
            </tr>
            </tfoot>

        </table>
        <div class="row sub_btn white-bg" style="width:100%;text-align:center;padding: 20px 0">
            <input type="button" class="btn btn-success save" value="保存并再添加一条" id="save1">
            <input type="button" class="btn btn-success save" value="保存并并返回" id="save2">
            <input type="button" class="btn btn-warning" value="返回" onclick="parent.layer.close(parent.layer.getFrameIndex(window.name))">
        </div>

    </form>
</div>
<!-- 全局js -->
{include file="Public/footer"}
<script src="__STATIC__/layout/js/plugins/suggest/bootstrap-suggest.min.js"></script>
<!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
<script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
<script src="__STATIC__/layout/js/plugins/layer/laydate/laydate.js"></script>
<script src="__STATIC__/layout/js/contabs_sub.js"></script>

<script>
    var link1 = "{:url('select/netjson2',['jxs_id'=>request()->get('jxs_id')])}"
    var link2 = '{:url("benCiJinChangTiaoMa")}'
    var link3 = '{:url("fyjrbm")}'
    var link4 = '{:url("TiApply/prodetail")}'
    var link5 = '{:url("tinetgroup/saveAsCommonNetGroup")}'
    var link6 = '{:url("selectMyNetGroup")}'
    var link7 = '{:url("selectNet")}'
    var link8 = '{:url("selectmxbcjctm")}'
    var jxs_id = '{:request()->get("jxs_id")}'
</script>
<script src="__STATIC__/layout/js/tijinchang/addData.js"></script>
</body>
</html>
